package com.yusheng.tr.common.core.entity.multi;

import com.alibaba.fastjson2.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 模型管理表
 * </p>
 *
 * @author author
 * @since 2023-10-02
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("model_mng")
@Schema(title = "ModelMng对象",description = "模型管理表")
public class ModelMngEntity implements Serializable {

    private static final long serialVersionUID = 1L;


    @Schema(name = "模型系列主键")
    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;

    @Schema(name = "模型名称")
    private String name;


    @Schema(name = "上级主键")
    private String parentId;

    @Schema(name = "顺序")
    @TableField(value = "order_num")
    private Integer orderNum;

    @Schema(name = "状态;0启用，1禁用")
    private Integer status;

    @TableField(value = "create_by", fill = FieldFill.INSERT)
    @Schema(name = "创建者")
    private String createBy;

    @TableField(value = "update_by", fill = FieldFill.INSERT_UPDATE)
    @Schema(name = "更新者")
    private String updateBy;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    @Schema(name = "创建时间")
    private Date createTime;

    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    @Schema(name = "更新时间")
    private Date updateTime;


}
